// 计时器，传入一个数，格式化成 00'00" 时间
export const countdownTimer = (num) => {
	const format = (num) =>{
		const str = `000${num}`
		return str.substr(str.length - 2)
	}
	return `${format(Math.floor(num/60))}'${format(num%60)}"`
}
// 模拟sleep
export const iceDelay = (second) => {
	return new Promise(resolve => {
		let st = setTimeout(() => {
			clearTimeout(st)
			resolve();
		}, second);
	});
}